<form id="add-form" class="form-horizontal" method="POST" action="{:url('bsave')}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">终端版本名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="name" value="{$data['name']|default=''}" class="form-control"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">终端类型:</label>
        <div class="col-xs-12 col-sm-8">
         {if condition="empty($data)"}   
             <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" name="terminal[]" value="1" type="checkbox">电脑端</label>
             <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" name="terminal[]" value="2"  type="checkbox">平板端</label>
             <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" name="terminal[]" value="3"  type="checkbox">手机端</label>
         {else/} 
            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" name="terminal[]" value="1" {if condition="$data['terminal'] == 1"}checked{/if} type="checkbox">电脑端</label>
            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" name="terminal[]" value="2" {if condition="$data['terminal'] == 2 "}checked{/if} type="checkbox">平板端</label>
            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" name="terminal[]" value="3" {if condition="$data['terminal'] == 3 "}checked{/if} type="checkbox">手机端</label>
         {/if}   
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">终端版本描述:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea type="text" name="des" value="{$data.des|default=''}" class="form-control"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
        </div>
    </div>
</form>